[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

USB Drive as Floppy

Filed under: Hacking — Thomas @ 00:10

2008-05-25
00:10

Dear lazyweb,

I have a 4 GB Cruzer Micro USB Drive. When mounted there's a /dev/sr1 device which is pretending to be a CD-ROM, and a normal sdc1 device that is a VFAT/WIN95 partition with some files on. I deleted everything on there, and then copied a flash image for my BIOS to it.

When I boot into my BIOS (GigaByte board), there is an option to go straight into the flasher utility.

The flasher utility can save and load bios from floppies. Floppy A is a real floppy, Floppy B is I assume the USB one, and is only present when I insert my Cruzer USB stick.

But the flasher utility doesn't see my BIOS file, even though it's named 8.3

I can save my current BIOS to Floppy B, and on subsequent reboots the file is always there. But when booting into Linux, I can't see the files the Flasher saves and sees, and vice versa.

Where is this hidden file ? What is the Flasher utility seeing ? Is part of the USB stick pretending to be a floppy and Linux not picking up on that ? How do I get to that area so I can copy the BIOS there and flash ?

11 Comments »

  1. No clue. I’ve always used flashcd from bootdisk.com plus isomaster.

    Comment by ignacio — 2008-05-25 @ 00:54

  2. The SanDisk 4GB Cruzer drives are U3 enabled which is probably why you are seeing the two partitions. On Windows boxes they present one piece as a CD Rom drive that auto-runs and then lets you use some of the U3 applications on any machine you boot. If you use them on a Linux box, they tend to show you a CD Rom drive and the more normal storage area (VFAT). I am wondering if at the BIOS level it sees that piece that gets detected as a CD-ROM and that is what it is writing to. I thought that area was normally somewhat unaccessible – but maybe not in the scenario you are using it.

    I’m a little vague on it as I nearly alway remove the U3 stuff as soon as I get a USB flash drive with that on it. SanDisk makes a utility, but it only runs from Windows. Since my work has plenty of Windows boxes, I just use one of them to remove the U3 stuff and make it work like a normal Flash drive in Linux. I am not sure how to remove it from Linux natively. I am sure looking up ‘U3 removal Linux’ would probably turn up something.

    Comment by Jeffrey Tadlock — 2008-05-25 @ 00:54

  3. […] http://thomas.apestaart.org/log/?p=623 asks Hoosgot, […]

    Pingback by USB Drive as Floppy — 2008-05-25 @ 01:19

  4. The problem seems one of the following:

    – Your BIOS is using a copy of the FAT anywhere in the disk that is not compatible with the one you use in Linux. In this case you can try to format the drive in FAT16.

    – Your USB Stick has a partition table and, in that case, there is “free” space just before the first partition. Floppy disks and some USB Sticks can’t have partitions and the BIOS can be using a “buggy” FAT. In this case you can try to format your whole drive, not only one partition.

    – Less possible, your drive has a hidden (BOOT) floppy in the first sectors (this can be found in some Media Players) and your BIOS is using that floppy. If this is the case, you can do a “cat /dev/WHOLEDRIVE > somefile” and then try to mount “somefile”. I know that you should process more “somefile” but I don’t remember how.

    – You’ve got a magical USB Stick with two faces… maybe double space ;-)

    All things I tell you to try doesn’t come with warranty, you can do them by your own risk.

    Comment by Pedro Martínez Juliá — 2008-05-25 @ 01:43

  5. If you are brave, you may find interesting to try flashrom utility from Coreboot (formerly LinuxBIOS) project

    http://www.coreboot.org/Flashrom

    On *some* systems it can re-flash your ROM directly from command line.

    Comment by Peter Lemenkov — 2008-05-25 @ 05:30

  6. The Cruzer drives have the hidden CD partition that you need to get rid of with their Windows app before it’ll run sanely, otherwise it uses the partition table of the hidden drive first in Linux (but works OK in FreeDOS).

    You can get the software from: http://www.sandisk.com/Retail/Default.aspx?CatID=1415 and run it, which should nuke the virtual CD-ROM and the partition table for it and give you just what you are looking for.

    Comment by Paul Drain — 2008-05-25 @ 06:43

  7. These sandisk usb drives use a technology called U3, which is basically some kind of firmware hack that tricks the OS into thinking that the stick is both a CD-ROM and a HDD. In reality, it’s just two partitions on the drive. The CD-ROM part can then be used (with special windows-only software AFAIK) to store “portable programs”. I’m guessing that they are using some weird fat-but-not-really-fat fs for it. That would explain things.

    As for the solution: just remove the U3 bs: http://www.sandisk.com/Retail/Default.aspx?CatID=1415

    Mind you that just repartitioning the drive will probably not work. I think the tool also changes some firmware in the usb drive. (I remember learning this the hard way ;) )

    Comment by Joachim Beckers — 2008-05-25 @ 06:46

  8. Your flash drive has the dreaded U3 software on it. It uses part of the flash drive’s capacity to emulate a CD-ROM with the (Windows-only) U3 software set to autorun.

    To remove the U3 stuff from the flash drive, you have to use a Windows-only program from u3.com. (Search for “U3 removal” on your favorite search engine.) After removing U3 from the drive, it will appear like every other flash drive on the planet — as a single USB mass storage device.

    Comment by rwg — 2008-05-25 @ 10:01

  9. +1 for flashrom
    http://www.pixelbeat.org/docs/bios/

    Comment by Pádraig Brady — 2008-05-25 @ 11:12

  10. BTW, not what you were asking, but you can get rid of the fake CD-ROM partition on the Cruzer: http://u3.com/uninstall/

    Comment by Dan Winship — 2008-05-25 @ 15:59

  11. You’ve got a “u3” drive. If you don’t use the U3 software on windows machines (and quite frankly, don’t know why you’d want to since the portableapps.com stuff does the same but better without using the fake cd rom drive hack), you can search for the “U3 Uninstaller” which permanently turns your drive back into just a plain single-partition drive. I’d recommend this, since it looks like your BIOS wants simple, and plus the U3 software is pretty poorly made and tends to crash windows PC’s instead of work on them :-/

    Comment by Ryan Pavlik — 2008-05-26 @ 16:06

RSS feed for comments on this post. TrackBack URL

Leave a comment

picture